package com.demo.BookList.model;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface BookRepository extends JpaRepository<Book, Long> {
    @Query("from Book b where b.id=:id")
    Book findBookById(@Param("id") Long id);

    void deleteById(Long id);
}
